
y=([zeros(10,1);ones(10,1);zeros(15,1);1;0;1;0;1;0;zeros(10,1);randn(23,1)*.7;zeros(10,1);sin(0:pi/4:4*pi)';zeros(5,1);sinc(-10:.5:10)']);

for i = 0:10:length(y)-30
    j= length(y)-i;
    clf;
    subplot(5,1,1);
    plot(y);
    hold on;
    plot(j-25:j,y(j-25:j),'r','LineWidth',2);
    o(i/10+1,:) = y(j-25:j)
    subplot(5,1,2:5);
    for k=1:(i/10+1)
        plot(o(k,:)-k*2.5);
        axis('manual');
        axis([0 26 -25*2.5/2 2]);
        hold on;
    end
    hold off;
    pause;
        
end

